/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.mc.manager;

import java.util.Collection;
import java.util.List;

import com.xy.biz.mc.domain.bo.MessageBO;
import com.xy.biz.mc.domain.query.MessageQuery;
import com.xy.biz.mc.domain.req.MultipleMessageRequest;
import com.xy.biz.mc.domain.resp.GetMessageResponse;

/**
 *
 *
 * @author zsp
 * @date 2021-2-25
 */
public interface MessageManager {

	/**
	 * 保存
	 *
	 * @param messageBO
	 */
	int saveMessage(MessageBO messageBO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllMessage(Collection<MessageBO> collection);

	/**
	 * 更新
	 *
	 * @param messageBO
	 */
	int updateMessage(MessageBO messageBO);

	/**
	 * 删除
	 *
	 * @param messageId
	 */
	int deleteMessage(Long messageId);

	/**
	 * 查找一个
	 *
	 * @param messageId
	 * @return
	 */
	MessageBO getMessage(Long messageId);

	/**
	 * 查找多个
	 *
	 * @param collection 标识集合
	 */
	List<MessageBO> listMessageById(Collection<Long> collection);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<GetMessageResponse> listMessage(MessageQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countMessage(MessageQuery query);

	/**
	 * 删除多条
	 * @param request
	 * @return
	 */
	int deleteMessageMultiple(MultipleMessageRequest request);

	int haveReadMultiple(MultipleMessageRequest request);
}
